
<div class="layui-card">
    <div class="layui-card-body">
        <form class="layui-form" action=""  method="post" id="cp-form">.

            <div class="layui-form-item">
                <label class="layui-form-label">标题 <span class="request-tips">*</span></label>
                <div class="layui-input-block">
                    <input type="text" name="title" required value="{$versions.title}"  lay-verify="required" placeholder="标题" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">详情 <span class="request-tips">*</span></label>
                <div class="layui-input-block">
                    <script id="container" type="text/plain" name="contents">{$versions.contents|raw}</script>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">作者 <span class="request-tips">*</span></label>
                <div class="layui-input-block">
                    <input type="text" name="author" required value="{$versions.author}" lay-verify="required" placeholder="作者" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">发行阶段 <span class="request-tips">*</span></label>
                <div class="layui-input-inline">
                    <select name="version_code" id="">
                        <option value="1" {eq name="$versions.version_code.value" value="1"}selected{/eq}>Alpha初步版</option>
                        <option value="2" {eq name="$versions.version_code.value" value="2"}selected{/eq}>Beta测试版</option>
                        <option value="3" {eq name="$versions.version_code.value" value="3"}selected{/eq}>γ成熟版</option>
                        <option value="4" {eq name="$versions.version_code.value" value="4"}selected{/eq}>Trial试用版</option>
                        <option value="5" {eq name="$versions.version_code.value" value="5"}selected{/eq}>Unregistered未注册版</option>
                        <option value="6" {eq name="$versions.version_code.value" value="6"}selected{/eq}>Demo演示版</option>
                        <option value="7" {eq name="$versions.version_code.value" value="7"}selected{/eq}>Release正式版</option>
                        <option value="8" {eq name="$versions.version_code.value" value="8"}selected{/eq}>Registered注册版</option>
                    </select>
                </div>
                <label class="layui-form-label">版本号 <span class="request-tips">*</span></label>
                <div class="layui-input-inline">
                    <input type="text" name="version_number" value="{$versions.version_number}" required  lay-verify="required" placeholder="版本号" autocomplete="off" class="layui-input">
                </div>
            </div>

            <?php
                if(get_user()['id'] == app\common\constants\AdminConstant::SUPER_ADMIN_ID){
            ?>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <input type="hidden" name="id" value="{$versions.id}">
                    <div class="layui-text">带 * 号的为必填项</div>
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                    <a href="{:url('admin/system.version/index')}" class="layui-btn layui-btn-primary" >返回</a>
                </div>
            </div>
            <?php }?>


        </form>
    </div>
</div>
